<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>用户安全中心</title>
	<script type="text/javascript" src="common/jquery/jquery.js"></script>
	<script type="text/javascript">
	if (window != top) 
		top.location.href = location.href;  
	</script>
<script type="text/javascript">
	$(document).ready(function(){
		var name = document.getElementById("messageName").value;
		var pass = document.getElementById("messagePass").value;

		if(name != "" && pass != ""){
			alert(name+"/"+pass);
			return;
		}
		if(name != ""){
			alert(name);
		}
		if(pass != ""){
			alert(pass);
		}
	});
	function check(){
		var username = $("input[name=username]").val();
		var password = $("input[name=password]").val();
		console.info(password);
		if(username=="" && password==""){
			alert("用户名或密码不能为空！");
			$("input[name=username]").focus();
			return false;
		}
		if(username==""){
			alert("请输入用户名！");
			$("input[name=username]").focus();
			return false;
		}
		if(password==""){
			alert("请输入密码！");
			$("input[name=password]").focus();
			return false;
		}
		return true;
	}

</script>
	</head>
<body  onload="document.f.username.focus();">

<form name="f" action="login/login!login" method="post" onsubmit="return check();">

<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#e5f6cf">&nbsp;</td>
  </tr>
  <tr>
    <td height="608" background="common/images/login/login_03.gif"><table width="862" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="266" background="common/images/login/login_04.gif">&nbsp;</td>
      </tr>
      <tr>
        <td height="95"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="424" height="95" background="common/images/login/login_06.gif">&nbsp;</td>
            <td width="183" background="common/images/login/login_07.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="21%" height="30"><div align="center"><span class="STYLE3">用户</span></div></td>
                <td width="79%" height="30"><input type="text" name="username"  style="height:18px; width:130px; border:solid 1px #cadcb2; font-size:12px; color:#81b432;"></td>
              </tr>
              <tr>
                <td height="30"><div align="center"><span class="STYLE3">密码</span></div></td>
                <td height="30"><input type="password" name="password"  style="height:18px; width:130px; border:solid 1px #cadcb2; font-size:12px; color:#81b432;"></td>
              </tr>
              <tr>
                <td height="30">&nbsp;</td>
                <td height="30">
                	<input type="submit"" value="登陆">
                	<input type="reset"" value="重置">
               </td>
              </tr>
            </table></td>
            <td width="255" background="common/images/login/login_08.gif">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="247" valign="top" background="common/images/login/login_09.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="22%" height="30">&nbsp;</td>
            <td width="56%">&nbsp;</td>
            <td width="22%">&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="44%" height="20">&nbsp;</td>
                <td width="56%" class="STYLE4">版本 2011V1.0 </td>
              </tr>
            </table></td>
            <td>&nbsp;</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td bgcolor="#a2d962">&nbsp;</td>
  </tr>
</table>
<input type="hidden" id="messageName" name="messageName" value="${errors['username'] }">
<input type="hidden" id="messagePass" name="messagePass" value="${errors['password'] }">
</form>
<map name="Map"><area shape="rect" coords="3,3,36,19" href="#"><area shape="rect" coords="40,3,78,18" href="#"></map></body>
</html>

